home *** CD-ROM | disk | FTP | other *** search
/ Halting the Hacker - A P…uide to Computer Security / Halting the Hacker - A Practical Guide to Computer Security.iso / rfc / rfc1919.txt < prev    next >
Text File  |  1997-04-01  |  87KB  |  1,964 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          M. Chatel
  8. Request for Comments: 1919                                    Consultant
  9. Category: Informational                                       March 1996
  10.  
  11.  
  12.                 Classical versus Transparent IP Proxies
  13.  
  14. Status of this Memo
  15.  
  16.    This memo provides information for the Internet community.  This memo
  17.    does not specify an Internet standard of any kind.  Distribution of
  18.    this memo is unlimited.
  19.  
  20. Abstract
  21.  
  22.    Many modern IP security systems (also called "firewalls" in the
  23.    trade) make use of proxy technology to achieve access control.  This
  24.    document explains "classical" and "transparent" proxy techniques and
  25.    attempts to provide rules to help determine when each proxy system
  26.    may be used without causing problems.
  27.  
  28. Table of Contents
  29.  
  30.    1.  Background . . . . . . . . . . . . . . . . . . . . . . . . . 2
  31.    2.  Direct communication (without a proxy) . . . . . . . . . . . 3
  32.    2.1.  Direct connection example  . . . . . . . . . . . . . . . . 3
  33.    2.2.  Requirements of direct communication . . . . . . . . . . . 5
  34.    3.    Classical application proxies  . . . . . . . . . . . . . . 5
  35.    3.1.  Classical proxy session example  . . . . . . . . . . . . . 6
  36.    3.2.  Characteristics of classical proxy configurations  . . .  12
  37.    3.2.1.  IP addressing and routing requirements . . . . . . . .  12
  38.    3.2.2.  IP address hiding  . . . . . . . . . . . . . . . . . .  14
  39.    3.2.3.  DNS requirements . . . . . . . . . . . . . . . . . . .  14
  40.    3.2.4.  Software requirements  . . . . . . . . . . . . . . . .  15
  41.    3.2.5.  Impact of a classical proxy on packet filtering  . . .  15
  42.    3.2.6.  Interconnection of conflicting IP networks . . . . . .  16
  43.    4.  Transparent application proxies  . . . . . . . . . . . . .  19
  44.    4.1.  Transparent proxy connection example . . . . . . . . . .  20
  45.    4.2.  Characteristics of transparent proxy configurations  . .  26
  46.    4.2.1.  IP addressing and routing requirements . . . . . . . .  26
  47.    4.2.2.  IP address hiding  . . . . . . . . . . . . . . . . . .  28
  48.    4.2.3.  DNS requirements . . . . . . . . . . . . . . . . . . .  28
  49.    4.2.4.  Software requirements  . . . . . . . . . . . . . . . .  29
  50.    4.2.5.  Impact of a transparent proxy on packet filtering  . .  30
  51.    4.2.6.  Interconnection of conflicting IP networks . . . . . .  31
  52.    5.  Comparison chart of classical and transparent proxies  . .  31
  53.    6.  Improving transparent proxies  . . . . . . . . . . . . . .  32
  54.    7.  Security Considerations  . . . . . . . . . . . . . . . . .  34
  55.  
  56.  
  57.  
  58. Chatel                       Informational                      [Page 1]
  59.  
  60. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  61.  
  62.  
  63.    8.  Acknowledgements . . . . . . . . . . . . . . . . . . . . .  34
  64.    9.  References . . . . . . . . . . . . . . . . . . . . . . . .  35
  65.  
  66. 1. Background
  67.  
  68.    An increasing number of organizations use IP security systems to
  69.    provide specific access control when crossing network security
  70.    perimeters. These systems are often deployed at the network boundary
  71.    between two organizations (which may be part of the same "official"
  72.    entity), or between an organization's network and a large public
  73.    internetwork such as the Internet.
  74.  
  75.    Some people believe that IP firewalls will become commodity products.
  76.    Others believe that the introduction of IPv6 and of its improved
  77.    security capabilities will gradually make firewalls look like stopgap
  78.    solutions, and therefore irrelevant to the computer networking scene.
  79.    In any case, it is currently important to examine the impact of
  80.    inserting (and removing) a firewall at a network boundary, and to
  81.    verify whether specific types of firewall technologies may have
  82.    different effects on typical small and large IP networks.
  83.  
  84.    Current firewall designs usually rely on packet filtering, proxy
  85.    technology, or a combination of both. Packet filtering (although hard
  86.    to configure correctly in a security sense) is now a well documented
  87.    technology whose strengths and weaknesses are reasonably understood.
  88.    Proxy technology, on the other hand, has been deployed a lot but
  89.    studied little. Furthermore, many recent firewall products support a
  90.    capability called "transparent proxying". This type of feature has
  91.    been subject to much more marketing attention than actual technical
  92.    analysis by the networking community.
  93.  
  94.    It must be remembered that the Internet's growth and success is
  95.    strongly related to its "open" nature. An Internet which would have
  96.    been segmented from the start with firewalls, packet filters, and
  97.    proxies may not have become what it is today. This type of discussion
  98.    is, however, outside the scope of this document, which just attempts
  99.    to provide an understandable description of what are network proxies,
  100.    and of what are the differences, strengths, and weaknesses of
  101.    "classical" and "transparent" network proxies.  Within the context of
  102.    this document, a "classical" proxy is the older (some would say old-
  103.    fashioned) type of proxy of the two.
  104.  
  105.    Also note that in this document, the word "connection" is used for an
  106.    application session that uses TCP, while the word "session" refers to
  107.    an application dialog that may use UDP or TCP.
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Chatel                       Informational                      [Page 2]
  115.  
  116. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  117.  
  118.  
  119. 2. Direct communication (without a proxy)
  120.  
  121.    In the "normal" Internet world, systems do not use proxies and simply
  122.    use normal TCP/IP to communicate with each other. It is important
  123.    (for readers who may not be familiar with this) to take a quick look
  124.    at the operations involved, in order to better understand what is the
  125.    exact use of a proxy.
  126.  
  127.    2.1 Direct connection example
  128.  
  129.       Let's take a familiar network session and describe some details of
  130.       its operation. We will look at what happens when a user on a
  131.       client system "c.dmn1.com" sets up an FTP connection to the server
  132.       system "s.dmn2.com". The client system's IP address is
  133.       c1.c2.c3.c4, the server's IP address is s1.s2.s3.s4.
  134.  
  135.        +---------------+      +----------+      +---------------+
  136.        |               |     /    IP      \     |               |
  137.        |  c.dmn1.com   |----+  network(s)  +----|  s.dmn2.com   |
  138.        | (c1.c2.c3.c4) |     \            /     | (s1.s2.s3.s4) |
  139.        +---------------+      +----------+      +---------------+
  140.  
  141.  
  142.       The user starts an instance of an FTP client program on the client
  143.       system "c.dmn1.com", and specifies that the target system is
  144.       "s.dmn2.com". On command-line systems, the user typically types:
  145.  
  146.           ftp s.dmn2.com
  147.  
  148.       The client system needs to convert the server's name to an IP
  149.       address (if the user directly specified the server by address,
  150.       this step is not needed).
  151.  
  152.       Converting the server name to an IP address requires work to be
  153.       performed which ranges between two extremes:
  154.  
  155.        a) the client system has this name in its hosts file, or has
  156.           local DNS caching capability and successfully retrieves the
  157.           name of the server system in its cache. No network activity
  158.           is performed to convert the name to an IP address.
  159.  
  160.        b) the client system, in combination with DNS name servers,
  161.           generate DNS queries that eventually propagate close to the
  162.           root of the DNS tree and back down the server's DNS branch.
  163.           Eventually, a DNS server which is authoritative for the
  164.           server system's domain is queried and returns the IP
  165.           address associated with "s.dmn2.com" (depending on the case,
  166.           it may return this to the client system directly or to an
  167.  
  168.  
  169.  
  170. Chatel                       Informational                      [Page 3]
  171.  
  172. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  173.  
  174.  
  175.           intermediate name server). Ultimately, the client system
  176.           obtains a valid IP address for s.dmn2.com. For simplicity,
  177.           we assume the server has only one IP address.
  178.  
  179.        +---------------+     +--------+     +---------------+
  180.        |               |    /   IP     \    |               |
  181.        |  c.dmn1.com   |---+ network(s) +---|  s.dmn2.com   |
  182.        | (c1.c2.c3.c4) |    \          /    | (s1.s2.s3.s4) |
  183.        +---------------+     +--------+     +---------------+
  184.           A  |                /          \
  185.           |  | address for   /            \
  186.           |  | s.dmn2.com?  /              \
  187.           |  |             /                \
  188.           |  |            /                  \
  189.           |  |     +--------+ s.dmn2.com?  +--------+
  190.           |  +---->|  DNS   |------------->|  DNS   |
  191.           |        | server |              | server |
  192.           +--------|   X    |<-------------|   Y    |
  193.        s1.s2.s3.s4 +--------+  s1.s2.s3.s4 +--------+
  194.  
  195.       Once the client system knows the IP address of the server system,
  196.       it attempts to establish a connection to the standard FTP
  197.       "control" TCP port on the server (port 21). For this to work, the
  198.       client system must have a valid route to the server's IP address,
  199.       and the server system must have a valid route to the client's IP
  200.       address. All intermediate devices that behave like IP gateways
  201.       must have valid routes for both the client and the server. If
  202.       these devices perform packet filtering, they must ALL allow the
  203.       specific type of traffic required between C and S for this
  204.       specific application.
  205.  
  206.        +---------------+                    +---------------+
  207.        |  c.dmn1.com   |                    |  s.dmn2.com   |
  208.        | (c1.c2.c3.c4) |                    | (s1.s2.s3.s4) |
  209.        +---------------+                    +---------------+
  210.          | |                                    |   |
  211.          | | route to S              route to C |   |
  212.          | V                                    V   |
  213.          |                                          |
  214.          | A                                        | A
  215.          | | route to C                             | | route to S
  216.          | |                                        | |
  217.          | |      C          S                 C    | |
  218.        +----+    <-- +----+ -->    +----+     <-- +----+
  219.        | G1 |--------| Gx |--------| Gy |---------| Gn |
  220.        +----+ -->    +----+    <-- +----+ -->     +----+
  221.                S                C          S
  222.  
  223.  
  224.  
  225.  
  226. Chatel                       Informational                      [Page 4]
  227.  
  228. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  229.  
  230.  
  231.       The actual application work for the FTP session between the client
  232.       and server is done with a bidirectional flow of TCP packets
  233.       between the client's and server's IP addresses.
  234.  
  235.       The FTP protocol uses a slightly complex protocol and TCP
  236.       connection model which is, luckily, not important to the present
  237.       discussion. This allows slightly shortening this document...
  238.  
  239.    2.2 Requirements of direct communication
  240.  
  241.       Based on the preceding discussion, it is possible to say that the
  242.       following is required for a direct session between a client and
  243.       server to be successful:
  244.  
  245.        a) If the client uses the NAME of the server to reference it,
  246.           the client must either have a hardcoded name-to-address
  247.           binding for the server, or it must be able to resolve the
  248.           server name (typically using DNS). In the case of DNS, this
  249.           implies that the client and server must be part of the same
  250.           DNS architecture or tree.
  251.  
  252.        b) The client and server must be part of the same internetwork:
  253.           the client must have a valid IP route towards the server,
  254.           the server must have a valid IP route towards the client,
  255.           and all intermediate IP gateways must have valid routes
  256.           towards the client and server ("IP gateway" is the RFC
  257.           standard terminology; people often use the term "IP router"
  258.           in computer rooms).
  259.  
  260.        c) If there are devices on the path between the client and
  261.           server that perform packet filtering, all these devices must
  262.           permit the forwarding of packets between the IP address of
  263.           the client and the IP address of the server, at least for
  264.           packets that fit the protocol model of the FTP application
  265.           (TCP ports used, etc.).
  266.  
  267. 3. Classical application proxies
  268.  
  269.    A classical application proxy is a special program that knows one (or
  270.    more) specific application protocols. Most application protocols are
  271.    not symetric; one end is considered to be a "client", one end is a
  272.    "server".
  273.  
  274.    A classical application proxy implements both the "client" and
  275.    "server" parts of an application protocol. In practice, it only needs
  276.    to implement enough of the client and server protocols to accomplish
  277.    the following:
  278.  
  279.  
  280.  
  281.  
  282. Chatel                       Informational                      [Page 5]
  283.  
  284. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  285.  
  286.  
  287.    a) accept client sessions and appear to them as a server;
  288.  
  289.    b) receive from a client the name or address of the final target
  290.       server (this needs to be passed over the "client-proxy" session
  291.       in a way that is application-specific);
  292.  
  293.    c) setup a session to the final server and appear to be a client
  294.       from the server's point of view;
  295.  
  296.    d) relay requests, responses, and data between the client and
  297.       server;
  298.  
  299.    e) perform access controls according to the proxy's design
  300.       criteria (the main goal of the proxy, after all).
  301.  
  302.    The functional goal of the proxy is to relay application data between
  303.    clients and servers that may not have direct IP connectivity. The
  304.    security goal of the proxy is to do checks and types of access
  305.    controls that typical client and server software do not support or
  306.    implement.
  307.  
  308.    The following information will make it clear that classical proxies
  309.    can offer many hidden benefits to the security-conscious network
  310.    designer, at the cost of deploying client software with proxy
  311.    capabilities or of educating the users on proxy use.
  312.  
  313.    Client software issues are now easier to handle, given the increasing
  314.    number of popular client applications (for Web, FTP, etc.) that offer
  315.    proxy support. Designers developing new protocols are also more
  316.    likely to plan proxy capability from the outset, to ensure their
  317.    protocols can cross the many existing large corporate firewalls that
  318.    are based at least in part on classical proxy technology.
  319.  
  320.    3.1 Classical proxy session example
  321.  
  322.       We will repeat our little analysis of an FTP session. This time,
  323.       the FTP session is passing through a "classical" application proxy
  324.       system. As is often the case (although not required), we will
  325.       assume that the proxy system has two IP addresses, two network
  326.       interfaces, and two DNS names.
  327.  
  328.       The proxy system is running a special program which knows how to
  329.       behave like an FTP client on one side, and like an FTP server on
  330.       the other side. This program is what people call the "proxy". We
  331.       will assume that the proxy program is listening to incoming
  332.       requests on the standard FTP control port (21/tcp), although this
  333.       is not always the case in practice.
  334.  
  335.  
  336.  
  337.  
  338. Chatel                       Informational                      [Page 6]
  339.  
  340. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  341.  
  342.  
  343.        +---------------+      +----------+
  344.        |               |     /    IP      \
  345.        |  c.dmn1.com   |----+  network(s)  +----------+
  346.        | (c1.c2.c3.c4) |     \            /           |
  347.        +---------------+      +----------+    +-----------------+
  348.                                               | (p1.p2.p3.p4)   |
  349.                                               | proxy1.dmn3.com |
  350.                                               |                 |
  351.                                               | proxy2.dmn4.com |
  352.                                               | (p5.p6.p7.p8)   |
  353.        +---------------+      +----------+    +-----------------+
  354.        |               |     /    IP      \           |
  355.        |  s.dmn2.com   |----+  network(s)  +----------+
  356.        | (s1.s2.s3.s4) |     \            /
  357.        +---------------+      +----------+
  358.  
  359.  
  360.       The user starts an instance of an FTP client program on the client
  361.       system "c.dmn1.com", and MUST specify that the target system is
  362.       "proxy1.dmn3.com". On command-line systems, the user typically
  363.       types:
  364.  
  365.           ftp proxy1.dmn3.com
  366.  
  367.       The client system needs to convert the proxy's name to an IP
  368.       address (if the user directly specified the proxy by address, this
  369.       step is not needed).
  370.  
  371.       Converting the proxy name to an IP address requires work to be
  372.       performed which ranges between two extremes:
  373.  
  374.        a) the client system has this name in its hosts file, or has
  375.           local DNS caching capability and successfully retrieves the
  376.           name of the proxy system in its cache. No network activity
  377.           is performed to convert the name to an IP address.
  378.  
  379.        b) the client system, in combination with DNS name servers,
  380.           generate DNS queries that eventually propagate close to the
  381.           root of the DNS tree and back down the proxy's DNS branch.
  382.           Eventually, a DNS server which is authoritative for the
  383.           proxy system's domain is queried and returns the IP
  384.           address associated with "proxy1.dmn3.com" (depending on the
  385.           case, it may return this to the client system directly or
  386.           to an intermediate name server). Ultimately, the client
  387.           system obtains a valid IP address for proxy1.dmn3.com.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Chatel                       Informational                      [Page 7]
  395.  
  396. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  397.  
  398.  
  399.        +---------------+          +--------+
  400.        |               |         /   IP     \
  401.        |  c.dmn1.com   |--------+ network(s) +------------+
  402.        | (c1.c2.c3.c4) |         \          /             |
  403.        +---------------+          +--------+      +-----------------+
  404.         A  |                     /          \     | (p1.p2.p3.p4)   |
  405.         |  | address for        /            \    | proxy1.dmn3.com |
  406.         |  | proxy1.dmn3.com?  /              \   |    ...          |
  407.         |  |                  /                \  +-----------------+
  408.         |  |                 /                  \
  409.         |  |                /                    \
  410.         |  |         +--------+ proxy1.dmn3.com?  +--------+
  411.         |  +-------->|  DNS   |------------------>|  DNS   |
  412.         |            | server |                   | server |
  413.         +------------|   X    |<------------------|   Y    |
  414.          p1.p2.p3.p4 +--------+    p1.p2.p3.p4    +--------+
  415.  
  416.       Once the client system knows the IP address of the proxy system,
  417.       it attempts to establish a connection to the standard FTP
  418.       "control" TCP port on the proxy (port 21). For this to work, the
  419.       client system must have a valid route to the proxy's IP address,
  420.       and the proxy system must have a valid route to the client's IP
  421.       address. All intermediate devices that behave like IP gateways
  422.       must have valid routes to both the client and the proxy. If these
  423.       devices perform packet filtering, they must ALL allow the specific
  424.       type of traffic required between C and P1 for this specific
  425.       application (FTP).
  426.  
  427.       Finally, the proxy system must accept this incoming connection,
  428.       based on the client's IP address (the purpose of the proxy is
  429.       generally to do access control, after all).
  430.  
  431.        +---------------+                   |      ...        |
  432.        |  c.dmn1.com   |                   | proxy1.dmn3.com |
  433.        | (c1.c2.c3.c4) |                   |  (p1.p2.p3.p4)  |
  434.        +---------------+                   +-----------------+
  435.          | |                                    |   |
  436.          | | route to P1             route to C |   |
  437.          | V                                    V   |
  438.          |                                          |
  439.          | A                                        | A
  440.          | | route to C                             | | route to P1
  441.          | |                                        | |
  442.          | |      C          P1                C    | |
  443.        +----+    <-- +----+ -->    +----+     <-- +----+
  444.        | G1 |--------| Gx |--------| Gy |---------| Gn |
  445.        +----+ -->    +----+    <-- +----+ -->     +----+
  446.                P1               C          P1
  447.  
  448.  
  449.  
  450. Chatel                       Informational                      [Page 8]
  451.  
  452. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  453.  
  454.  
  455.       The actual application work for the FTP session between the client
  456.       and proxy is done with a bidirectional flow of TCP packets between
  457.       the client's and proxy's IP addresses.
  458.  
  459.       For this to work, the proxy FTP application MUST fully support the
  460.       FTP protocol and look identical to an FTP server from the client's
  461.       point of view.
  462.  
  463.       Once the client<->proxy session is established, the final target
  464.       server name must be passed to the proxy, since, when using a
  465.       "classical" application proxy, a way MUST be defined for the proxy
  466.       to determine the final target system. This can be achieved in
  467.       three ways:
  468.  
  469.        a) The client system supplies the name or address of the final
  470.           target system to the proxy in a method that is compatible
  471.           with the specific application protocol being used (in our
  472.           example, FTP). This is generally considered to be the main
  473.           problem with classical proxies, since for each application
  474.           being proxied, a method must be defined for passing the
  475.           name or address of the final target system. This method
  476.           must be compatible with every variant of client application
  477.           that implements the protocol (i.e. the target-passing
  478.           method must fit within the MINIMUM functionalities required
  479.           by the specific application protocol).
  480.  
  481.           For the FTP protocol, the generally popular method for
  482.           passing the final server name to the proxy is as follows:
  483.  
  484.           When the proxy prompts the FTP client for a username, the
  485.           client specifies a string of the form:
  486.  
  487.                 target_username@target_system_name
  488.                 or
  489.                 target_username@target_ip_address
  490.  
  491.           The proxy will then know what is the final target system.
  492.           The target_username (and the password supplied by the
  493.           client) will be forwarded "as is" by the proxy to the final
  494.           target system.
  495.  
  496.           A well-known example of an FTP proxy that behaves in this way
  497.           is the "ftp-gw" program which is part of the Trusted
  498.           Information System's firewall toolkit, available by anonymous
  499.           FTP at ftp.tis.com. Several commercial firewalls also support
  500.           this de-facto standard.
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Chatel                       Informational                      [Page 9]
  507.  
  508. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  509.  
  510.  
  511.        b) If there is only one possible final destination, the proxy
  512.           may be configured to know this destination in advance.
  513.           Since the IP address of the client system is known when the
  514.           proxy must make this decision, the proxy can (if required)
  515.           select a different destination based on the IP address of
  516.           the client.
  517.  
  518.        c) The client software may also support capabilities that allow
  519.           it to present to the user the illusion of a direct session
  520.           (the user just specifies the final target system, and the
  521.           client software automatically handles the problem of
  522.           reaching to the proxy system and passing the name or address
  523.           of the final target system in whatever mutually-acceptable
  524.           form).
  525.  
  526.           A well-known example of a system that provides modified
  527.           client software, proxy software, and that provides the
  528.           illusion of transparency is NEC's SOCKS system, available by
  529.           anonymous FTP at ftp.nec.com.
  530.  
  531.           Alternatively, several FTP client applications support the
  532.           "username@destination_host" de-facto standard implemented
  533.           (for example) by the "ftp-gw" proxy application.
  534.  
  535.       Once the FTP proxy application knows the name or IP address of the
  536.       target system, it can choose to do two things:
  537.  
  538.        a) Setup a session to the final target system, the more
  539.           frequent case.
  540.  
  541.        b) Decide (based on some internal configuration data) that it
  542.           cannot reach the final target system directly, but must go
  543.           through another proxy. This is rare today, but may become
  544.           temporarily common due to the current shortage of IP
  545.           network numbers which encourages organizations to deploy
  546.           "hidden" network numbers which are already assigned
  547.           elsewhere. Sessions between systems which have the same
  548.           IP network number but which belong to different actual
  549.           networks may require going through two proxy systems.
  550.           This is discussed in more detail in section 3.2.6,
  551.           "Interconnection of conflicting IP networks".
  552.  
  553.       If the FTP proxy decides to connect directly to the target system,
  554.       and what it has is the target system name, it will need to convert
  555.       the target system name into an IP address. If this process
  556.       involves DNS resolution, something like the following will happen:
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Chatel                       Informational                     [Page 10]
  563.  
  564. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  565.  
  566.  
  567.        +-----------------+
  568.        | proxy1.dmn3.com |
  569.        |  (p1.p2.p3.p4)  |          +--------+
  570.        |                 |         /   IP     \
  571.        | proxy2.dmn4.com |--------+ network(s) +------------+
  572.        |  (p5.p6.p7.p8)  |         \          /             |
  573.        +-----------------+          +--------+      +---------------+
  574.         A  |                     /          \       | (s1.s2.s3.s4) |
  575.         |  | address for        /            \      | s.dmn2.com    |
  576.         |  | s.dmn2.com?       /              \     |               |
  577.         |  |                  /                \    +---------------+
  578.         |  |                 /                  \
  579.         |  |                /                    \
  580.         |  |         +--------+   s.dmn2.com?     +--------+
  581.         |  +-------->|  DNS   |------------------>|  DNS   |
  582.         |            | server |                   | server |
  583.         +------------|   X    |<------------------|   Y    |
  584.          s1.s2.s3.s4 +--------+    s1.s2.s3.s4    +--------+
  585.  
  586.       Once the proxy system knows the IP address of the server system,
  587.       it attempts to establish a connection to the standard FTP
  588.       "control" TCP port on the server (port 21). For this to work, the
  589.       proxy system must have a valid route to the server's IP address,
  590.       and the server system must have a valid route to at least one of
  591.       the proxy's IP address. All intermediate devices that behave like
  592.       IP gateways must have valid routes to both the proxy and the
  593.       server. If these devices perform packet filtering, they must ALL
  594.       allow the specific type of traffic required between the proxy and
  595.       S for this specific application.
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Chatel                       Informational                     [Page 11]
  619.  
  620. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  621.  
  622.  
  623.        +-----------------+
  624.        | proxy1.dmn3.com |
  625.        |  (p1.p2.p3.p4)  |
  626.        |                 |                 +----------------+
  627.        | proxy2.dmn4.com |                 |  s.dmn2.com    |
  628.        |  (p5.p6.p7.p8)  |                 | (s1.s2.s3.s4)  |
  629.        +-----------------+                 +----------------+
  630.          | |                                    |   |
  631.          | | route to S             route to P2 |   |
  632.          | V                                    V   |
  633.          |                                          |
  634.          | A                                        | A
  635.          | | route to P2                            | | route to S
  636.          | |                                        | |
  637.          | |      P2         S                 P2   | |
  638.        +----+    <-- +----+ -->    +----+     <-- +----+
  639.        | G1 |--------| Gx |--------| Gy |---------| Gn |
  640.        +----+ -->    +----+    <-- +----+ -->     +----+
  641.                S                P2         S
  642.  
  643.  
  644.       The actual FTP application work between the proxy and server is
  645.       done with a bidirectional flow of TCP packets between the proxy's
  646.       and server's IP addresses.
  647.  
  648.       What actually happens BETWEEN THE CLIENT AND SERVER?  They both
  649.       send replies and responses to the proxy, which forwards data to
  650.       the "other" end. When one party opens a data connection and sends
  651.       a PORT command to the proxy, the proxy allocates its own data
  652.       connection and sends its PORT command to the "other" end. The
  653.       proxy also copies data across the connections created in this way.
  654.  
  655.    3.2 Characteristics of classical proxy configurations
  656.  
  657.       Several IP internetworks may be linked using only classical proxy
  658.       technology. It is currently popular to link two specific IP
  659.       internetworks in this way: the Internet and some organization's
  660.       "private" IP network. Such a proxy-based link is often the key
  661.       component of a firewall.
  662.  
  663.       When this is done, several benefits and problems are introduced
  664.       for network administrators and users.
  665.  
  666.       3.2.1 IP addressing and routing requirements.
  667.  
  668.          The proxy system must be able to address all client and server
  669.          systems to which it may provide service. It must also know
  670.          valid IP routes to all these client and server systems.
  671.  
  672.  
  673.  
  674. Chatel                       Informational                     [Page 12]
  675.  
  676. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  677.  
  678.  
  679.          Client and server systems must be able to address the proxy
  680.          system, and must know a valid IP route to the proxy system. If
  681.          the proxy system has several IP addresses (and often, several
  682.          physical network interfaces), the client and server systems
  683.          need only to be able to access ONE of the proxy system's IP
  684.          addresses.
  685.  
  686.          Note that client and server systems that use the proxy for
  687.          communication DO NOT NEED valid IP addressing or routing
  688.          information for systems that they reach through the proxy.
  689.  
  690.          In this sense, it can be said that systems separated by a
  691.          classical proxy are isolated from each other in an IP
  692.          addressing sense and in an IP routing sense.
  693.  
  694.          On the other hand, the classical proxy system (if running a
  695.          standard TCP/IP software stack) needs to have a single coherent
  696.          view of IP addressing and routing. If such a proxy system
  697.          interconnects two IP networks and two systems use the same IP
  698.          network/subnetwork number (one system on each network), the
  699.          proxy will only be able to address one of the systems.
  700.  
  701.          This restriction can be removed by chaining classical proxies
  702.          (this is described later in section 3.2.6, "Interconnection of
  703.          conflicting IP networks").
  704.  
  705.          Using a classical proxy for interconnection of IP
  706.          internetworks, it is also possible, with care, to achieve a
  707.          desirable "fail-safe" feature: no valid routing entries need to
  708.          exist for an internetwork which should be reached only through
  709.          the proxy (routing updates that could add such entries shout be
  710.          BLOCKED). If the proxy suddenly starts to behave like an IP
  711.          router, only one-way attacks become possible.
  712.  
  713.          In other words, assume an attacker has control of the remote
  714.          internetwork and has found a way to cause the proxy to route IP
  715.          packets, or has found a way to physically bypass the proxy.
  716.  
  717.          The attacker may inject packets, but the attacked internal
  718.          systems will be unable to reply to those packets. This
  719.          certainly does not make attacks infeasible (as exemplified by
  720.          certain holiday-period events in recent years), but it still
  721.          makes attacks more difficult.
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Chatel                       Informational                     [Page 13]
  731.  
  732. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  733.  
  734.  
  735.       3.2.2 IP address hiding
  736.  
  737.          Application "sessions" that go through a classical proxy are
  738.          actually made of two complete sessions:
  739.  
  740.              a) a session between the client and the proxy
  741.              b) a session between the proxy and the server
  742.  
  743.          A device on the path sees only the client<->proxy traffic or
  744.          the proxy<->server traffic, depending where it is located. If
  745.          the two sessions actually pass through the same physical
  746.          network, a device on that network may see both traffics, but
  747.          may have difficulty establishing the relationship between the
  748.          two sessions (depending on the specific application and
  749.          activity level of the network).
  750.  
  751.          A by-product of a classical proxy's behavior is commonly known
  752.          as "address hiding". Equipments on some side of a classical
  753.          proxy cannot easily determine what are the IP addresses used on
  754.          another side of the proxy.
  755.  
  756.          Address hiding is generally viewed as a Good Thing, since one
  757.          of the purposes of deploying proxies is to disclose as little
  758.          information about an internetwork as possible.
  759.  
  760.          People who are in charge of gathering network statistics, and
  761.          who do not have access to the proxy system's reports (if any)
  762.          may consider address hiding to be a Bad Thing, since the proxy
  763.          obscures the actual client/server relationships where the proxy
  764.          was inserted.  All IP activity originates and terminates on the
  765.          proxy itself (or appears to do so).
  766.  
  767.          In the same way, server software that accepts connections that
  768.          have gone through a classical proxy do not see the IP address
  769.          of the incoming client, unless this information is included in
  770.          the application protocol (and even if it is, in many cases, the
  771.          proxy will replace this information with its own address for
  772.          the protocol to be consistent). This makes server access
  773.          control unusable if it is based on client IP address checks.
  774.  
  775.       3.2.3 DNS requirements
  776.  
  777.          In most classical-proxy configurations, client systems pass the
  778.          desired server name (or address) to the proxy system WITHOUT
  779.          INTERPRETING IT. Because of this, the client system DOES NOT
  780.          REQUIRE to be able to resolve the name of the server system in
  781.          order to access it through a classical proxy. It only needs to
  782.          be able to resolve the name of the proxy (if referencing the
  783.  
  784.  
  785.  
  786. Chatel                       Informational                     [Page 14]
  787.  
  788. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  789.  
  790.  
  791.          proxy system by name).
  792.  
  793.          Because of this, it can be said that a classical proxy system
  794.          can offer DNS isolation. If two IP internetworks use completely
  795.          separate DNS trees (each with their own DNS root servers),
  796.          client software in one IP internetwork may still reference a
  797.          server name in the other IP internetwork by passing its name to
  798.          the classical proxy.
  799.  
  800.          The classical proxy itself will not be able alone to resolve
  801.          DNS names in both environments (if running standard DNS
  802.          resolution software), since it will need to point to one or the
  803.          other of the two DNS "universes".
  804.  
  805.          A well-known technique called "split-brain DNS" can be used to
  806.          relax this restriction somewhat, but such a technique
  807.          ultimately involves prioritizing one DNS environment over
  808.          another. If a DNS query can return a valid answer in both
  809.          environments, only one of the answers will be found by the
  810.          proxy.
  811.  
  812.       3.2.4 Software requirements
  813.  
  814.          A classical proxy application is a fairly simple piece of
  815.          software, often simpler than either a real client
  816.          implementation or a real server implementation.  Such a program
  817.          may run on any system that supports normal TCP/IP connections,
  818.          and often does not require "system" or "superuser" privilege.
  819.  
  820.          Classical proxy connections have no impact on normal server
  821.          software; the proxy looks like a normal client in most respects
  822.          except for its IP address and its "group" nature. All
  823.          connections from the network on the other side of the proxy
  824.          appear to come from the proxy, which poses problems if access
  825.          control by client system is desired.
  826.  
  827.          Normal client software may access a classical proxy if the user
  828.          is willing or able to go through the extra steps necessary to
  829.          indicate the final server to the proxy (whatever they are).
  830.          Alternatively, modified (or newer) client software may be used
  831.          that knows how to negotiate transparently with the proxy.
  832.  
  833.       3.2.5 Impact of a classical proxy on packet filtering
  834.  
  835.          If packet filtering is needed around a classical proxy, the
  836.          packet filtering rules tend to be simplified, since the only
  837.          traffic needed and allowed will originate from or terminate on
  838.          the proxy (in an IP sense).
  839.  
  840.  
  841.  
  842. Chatel                       Informational                     [Page 15]
  843.  
  844. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  845.  
  846.  
  847.          If the proxy starts behaving like an IP router, or if it is
  848.          physically bypassed, such filtering rules, if deployed
  849.          generally within an IP internetwork, will tend to prevent any
  850.          direct traffic flow between the "internal" internetwork and
  851.          "external" internetworks that are supposed to be only reachable
  852.          through the application proxy.
  853.  
  854.       3.2.6 Interconnection of conflicting IP networks
  855.  
  856.          By chaining classical proxies, it is possible to achieve some
  857.          interconnection of IP networks that have a high level of
  858.          conflict. In practice, this type of setup resolves IP
  859.          addressing conflicts much better than DNS conflicts. But DNS
  860.          conflicts are currently less of a problem because the DNS
  861.          "address space" is almost infinitely large (has anybody
  862.          calculated the possible DNS address space based on the RFC-
  863.          standard maximum host name length?).
  864.  
  865.          Even though RFC 1597 was never more than an informational RFC,
  866.          many organizations have been quietly following its suggestions,
  867.          for lack of an easier solution. Now assume two organizations
  868.          each use class A network number 10 on their network. Suddenly,
  869.          they need to interconnect.  What can they do?
  870.  
  871.          First possibility: one side changes network number (not as hard
  872.          as people think if properly planned, but this still represents
  873.          some work)
  874.  
  875.          Second possibility: they merge the two numbers by renumbering
  876.          partially on each side to remove conflicts (actually harder to
  877.          do, but has the political advantage that both sides have to do
  878.          some work)
  879.  
  880.          Third possibility: they communicate through chained classical
  881.          proxies:
  882.  
  883.  
  884.             +--------+     +--------+   +--------+     +--------+
  885.            /  Org. 1  \    | Proxy  |   | Proxy  |    /  Org. 2  \
  886.           +  dmn1.com  +---+ system +---+ system +---+  dmn2.com  +
  887.            \  net 10  /    |    1   |   |   2    |    \  net 10  /
  888.             +--------+     +--------+   +--------+     +--------+
  889.  
  890.  
  891.          Both proxy 1 and 2 are standard systems running normal TCP/IP
  892.          software stacks. Their configuration is not typical, however:
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Chatel                       Informational                     [Page 16]
  899.  
  900. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  901.  
  902.  
  903.              a) The link between proxy 1 and proxy 2 may use any IP
  904.                 network number that is not used (or not needed) on
  905.                 either side. Nothing on Org.1 and Org.2's networks
  906.                 need to have an IP route to this network.
  907.  
  908.              b) Proxy 1 has an IP route for network 10 that points to
  909.                 Organization 1's network, and does DNS resolution
  910.                 (if required) using dmn1.com's name servers.
  911.  
  912.              c) Proxy 2 has an IP route for network 10 that points to
  913.                 Organization 2's network, and does DNS resolution
  914.                 (if required) using dmn2.com's name servers.
  915.  
  916.              d) Proxy 1 and proxy 2 only require a host IP route to
  917.                 each other for communication.
  918.  
  919.              e) For this to be convenient, the classical proxy
  920.                 applications must support the automatic selection of
  921.                 a destination based on the client IP address.
  922.  
  923.              f) On proxy system 1, the proxy software treats incoming
  924.                 sessions from proxy system 2 in the normal way: the
  925.                 "client" (proxy system 2) will be prompted in an
  926.                 application-specific way for the final destination.
  927.                 However, incoming sessions from Org.1 addresses are
  928.                 immediately and automatically forwarded to proxy
  929.                 system 2.
  930.  
  931.                 Proxy system 2 is configured similarly (that is,
  932.                 connections coming from proxy 1 are prompted for a
  933.                 target server name, connections from Org.2 addresses
  934.                 are immediately and automatically forwarded to
  935.                 proxy 1.
  936.  
  937.          From a user's point of view, the behavior of such a chained
  938.          proxy system is not very different from a single classical
  939.          application proxy:
  940.  
  941.              a) A user on a client system with address 10.1.2.3
  942.                 on Org.1's network wishes to do an anonymous FTP to
  943.                 "server.dmn2.com".
  944.  
  945.              b) The user starts an FTP towards proxy 1. Proxy 1 sees
  946.                 an incoming connection from an address in network 10,
  947.                 so it immediately relays the connection to proxy 2.
  948.  
  949.              c) Proxy 2 sees a connection coming from proxy 1, so it
  950.                 prompts the client. The user sees the username prompt
  951.  
  952.  
  953.  
  954. Chatel                       Informational                     [Page 17]
  955.  
  956. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  957.  
  958.  
  959.                 and types (assuming FTP proxies that behave like TIS's
  960.                 ftp-gw):
  961.  
  962.                      anonymous@server.dmn2.com
  963.  
  964.                 This will be resolved IN THE CONTEXT OF Org. 2'S
  965.                 NETWORK. The user can then complete the dialog and
  966.                 use the FTP connection.
  967.  
  968.              d) Note that this setup will work even if the client and
  969.                 server have the EXACT SAME IP ADDRESS (10.1.2.3 in
  970.                 our example).
  971.  
  972.              If the proxy applications support selecting another
  973.              proxy based on the destination supplied by the client,
  974.              and if DNS domains are unique, more than two conflicting
  975.              IP networks can be linked in this way! Here is an
  976.              example configuration:
  977.  
  978.              a) Four IP networks that all use network 10 are linked
  979.                 by four proxy systems. The four proxy systems share a
  980.                 common, private IP network number and physical link
  981.                 (LAN or WAN).
  982.  
  983.              b) A user on organization 1's network wishes to access
  984.                 a server on network 3. The user connects to its local
  985.                 proxy (proxy 1) and supplies that target system name.
  986.  
  987.              c) Proxy 1 determines, based on a configuration rule,
  988.                 that the target system name is reachable by using
  989.                 proxy 3. So it connects to proxy 3 and passes the
  990.                 target system name.
  991.  
  992.              d) Proxy 3 determines that the target system name is
  993.                 local (to itself) and connects to it directly.
  994.  
  995.  
  996.              Security Implications of chained proxies
  997.  
  998.              Obviously, when such "chained" configurations are built,
  999.              access control rules and logging based on a
  1000.              final-client/final-server combination are difficult to
  1001.              enforce, since the first proxy in the chain sees a
  1002.              final-client/proxy relationship and the last proxy in
  1003.              the chain sees a proxy/final-server relationship.
  1004.  
  1005.              Doing better than this requires that the proxies be
  1006.              capable of passing the "original-client" and
  1007.  
  1008.  
  1009.  
  1010. Chatel                       Informational                     [Page 18]
  1011.  
  1012. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1013.  
  1014.  
  1015.              "final-destination" information back and forth in the
  1016.              proxy chain for access control and/or logging purposes.
  1017.              This requires the proxies to trust each other, and
  1018.              requires the network path to be trusted (forging this
  1019.              information becomes an excellent attack).
  1020.  
  1021.              Even if these problems were to be solved reliably, the
  1022.              original goal of the proxy chains was to solve an IP
  1023.              and possibly a DNS conflict. The "original-client" and
  1024.              "final-destination" values may not have the same
  1025.              meaning everywhere in the overall setup. Tagging the
  1026.              information with a "universe-name" may help, assuming
  1027.              it is possible to define unique universe names in the
  1028.              first place. Obviously this topic requires more study.
  1029.  
  1030. 4. Transparent application proxies
  1031.  
  1032.    The most visible problem of classical application proxies is the need
  1033.    for proxy-capable client programs and/or user education so that users
  1034.    know how to use the proxies.
  1035.  
  1036.    When somebody thought of modifying proxies in such a way that normal
  1037.    user procedures and normal client applications would still be able to
  1038.    take advantage of the proxies, the transparent proxy was born.
  1039.  
  1040.    A transparent application proxy is often described as a system that
  1041.    appears like a packet filter to clients, and like a classical proxy
  1042.    to servers. Apart from this important concept, transparent and
  1043.    classical proxies can do similar access control checks and can offer
  1044.    an equivalent level of security/robustness/performance, at least as
  1045.    far as the proxy itself is concerned.
  1046.  
  1047.    The following information will make it clear that small organizations
  1048.    that wish to use proxy technology for protection, that wish to rely
  1049.    entirely on one proxy system for network perimeter security, that
  1050.    want a minimal (or zero) impact on user procedures, and that do not
  1051.    wish to bother with proxy-capable clients will tend to prefer
  1052.    transparent proxy technology.
  1053.  
  1054.    Organizations with one or more of the following characteristics may
  1055.    prefer deploying classical proxy technology:
  1056.  
  1057.    a) own a substantial internal IP router network, and wish to
  1058.       avoid adding "external" routes on the network
  1059.    b) wish to deploy "defence in depth", such as internal firewalls,
  1060.       packet filtering on the internal network
  1061.    c) wish to keep their DNS environment fully isolated from the
  1062.       "other side" of their proxy system, or that fear that their
  1063.  
  1064.  
  1065.  
  1066. Chatel                       Informational                     [Page 19]
  1067.  
  1068. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1069.  
  1070.  
  1071.       internal DNS servers may be vulnerable to data-driven attacks
  1072.    d) use some IP networks that are in conflict with the "other side"
  1073.       of their proxy system
  1074.    e) wish to use proxy applications that are easily portable
  1075.       to different operating system types and/or versions
  1076.    f) wish to deploy multiple proxy systems interconnecting them
  1077.       to the SAME remote network without introducing dynamic
  1078.       routing for external routes on the internal network
  1079.  
  1080.    4.1 Transparent proxy connection example
  1081.  
  1082.       Let us go through an FTP sesssion again, through a "transparent"
  1083.       proxy this time. We assume that the proxy system has two IP
  1084.       addresses, two network interfaces, and two DNS names.
  1085.  
  1086.       The proxy system is running a special program which knows how to
  1087.       behave like an FTP client on one side, and like an FTP server on
  1088.       the other side. This program is what people call the "proxy". This
  1089.       program, being a transparent proxy, also has a very special
  1090.       relationship with the TCP/IP implementation of the proxy system.
  1091.       This relationship may be built in several ways, we will describe
  1092.       only one such possible way.
  1093.  
  1094.       We will assume that the proxy program is listening to incoming
  1095.       requests on the standard FTP control port (21/tcp), although this
  1096.       is not always the case in practice.
  1097.  
  1098.  
  1099.        +---------------+      +----------+
  1100.        |               |     /    IP      \
  1101.        |  c.dmn1.com   |----+  network(s)  +----------+
  1102.        | (c1.c2.c3.c4) |     \            /           |
  1103.        +---------------+      +----------+    +-----------------+
  1104.                                               | (p1.p2.p3.p4)   |
  1105.                                               | proxy1.dmn3.com |
  1106.                                               |                 |
  1107.                                               | proxy2.dmn4.com |
  1108.                                               | (p5.p6.p7.p8)   |
  1109.        +---------------+      +----------+    +-----------------+
  1110.        |               |     /    IP      \           |
  1111.        |  s.dmn2.com   |----+  network(s)  +----------+
  1112.        | (s1.s2.s3.s4) |     \            /
  1113.        +---------------+      +----------+
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Chatel                       Informational                     [Page 20]
  1123.  
  1124. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1125.  
  1126.  
  1127.       The user starts an instance of an FTP client program on the client
  1128.       system "c.dmn1.com", and specifies a destination of "s.dmn2.com",
  1129.       just like if it was reachable directly.  On command-line systems,
  1130.       the user typically types:
  1131.  
  1132.           ftp s.dmn2.com
  1133.  
  1134.       The client system needs to convert the server's name to an IP
  1135.       address (if the user directly specified the server by address,
  1136.       this step is not needed).
  1137.  
  1138.       Converting the server name to an IP address requires work to be
  1139.       performed which ranges between two extremes:
  1140.  
  1141.        a) the client system has this name in its hosts file, or has
  1142.           local DNS caching capability and successfully retrieves the
  1143.           name of the proxy system in its cache. No network activity
  1144.           is performed to convert the name to an IP address.
  1145.  
  1146.        b) the client system, in combination with DNS name servers,
  1147.           generate DNS queries that eventually propagate close to the
  1148.           root of the DNS tree and back down the server's DNS branch.
  1149.           Eventually, a DNS server which is authoritative for the
  1150.           server system's domain is queried and returns the IP
  1151.           address associated with "s.dmn2.com" (depending on the
  1152.           case, it may return this to the client system directly or
  1153.           to an intermediate name server). Ultimately, the client
  1154.           system obtains a valid IP address for s.dmn2.com.
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Chatel                       Informational                     [Page 21]
  1179.  
  1180. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1181.  
  1182.  
  1183.        +---------------+          +--------+
  1184.        |               |         /   IP     \
  1185.        |  c.dmn1.com   |--------+ network(s) +------------+
  1186.        | (c1.c2.c3.c4) |         \          /             |
  1187.        +---------------+          +--------+      +-----------------+
  1188.         A  |                     /                | (p1.p2.p3.p4)   |
  1189.         |  | address for        /      +-----+    | proxy system    |
  1190.         |  | s.dmn2.com?       /      /       \   | (p5.p6.p7.p8)   |
  1191.         |  |                  /      /         \  +-----------------+
  1192.         |  |                 /      /           \         |
  1193.         |  |                /      / s.dmn2.com? |        |
  1194.         |  |         +--------+   /              |   +--------+
  1195.         |  +-------->|  DNS   |--+   +-------+   |  /   IP     \
  1196.         |            | server |     /         \  | + network(s) +
  1197.         +------------|   X    |<---+           + |  \          /
  1198.          s1.s2.s3.s4 +--------+     s1.s2.s3.s4| |   +--------+
  1199.                                                | |        |
  1200.                                                | +        |
  1201.                                                |  \   +--------+
  1202.                                                +   +->|  DNS   |
  1203.                                                 \     | server |
  1204.                                                  +----|   Y    |
  1205.                                                       +--------+
  1206.  
  1207.        NOTE: In practice, DNS servers that are authoritative for
  1208.              s.dmn2.com are highly likely to be located on the OTHER
  1209.              side of the proxy system. This means that DNS queries
  1210.              from the inside to the outside MUST be able to cross the
  1211.              proxy system. If the proxy system wishes to provide
  1212.              "address hiding", it must make these DNS queries
  1213.              (originating from the inside) appear to come from the
  1214.              proxy itself. This can be achieved by using a BIND-based
  1215.              DNS server (which has some proxy capabilities) or some
  1216.              simpler DNS proxy program.  For full RFC compliance,
  1217.              the proxy system must be able to relay TCP-based queries
  1218.              just like UDP-based queries, since some client systems
  1219.              are rumored to ONLY use TCP for DNS queries.
  1220.  
  1221.              The proxy system must be able to detect and block several
  1222.              classes of attacks based on DNS which (if nothing else)
  1223.              may cause denial of service:
  1224.  
  1225.              a) attempts from the outside to return corrupt cache
  1226.                 entries to an internal DNS server
  1227.              b) attempts to return DNS bindings which have no
  1228.                 relationship to the actual DNS query (some DNS
  1229.                 servers are vulnerable to this). The attacker's goal
  1230.                 may be to prime the cache of internal DNS servers with
  1231.  
  1232.  
  1233.  
  1234. Chatel                       Informational                     [Page 22]
  1235.  
  1236. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1237.  
  1238.  
  1239.                 interesting entries, including entries for internal
  1240.                 DNS names that point to external IP addresses...
  1241.              c) data-driven stuff similar in style to the "syslog
  1242.                 buffer overrun" type attacks.
  1243.  
  1244.       Once the client system knows the IP address of the server system,
  1245.       it attempts to establish a connection to the standard FTP
  1246.       "control" TCP port on the server (port 21). For this to work, the
  1247.       client system must have a valid route for the server's IP address
  1248.       THAT LEADS TO THE PROXY SYSTEM, and the proxy system must have a
  1249.       valid route for the client's IP address and the server's IP
  1250.       address. All intermediate devices that behave like IP gateways
  1251.       must have valid routes for the client, the server, and usually the
  1252.       proxy. If these devices perform packet filtering, they must ALL
  1253.       allow the specific type of traffic required between C and S for
  1254.       this specific application.
  1255.  
  1256.  
  1257.                                                 A
  1258.                                     route to S  |
  1259.                                                 |
  1260.                                            +-----------------+
  1261.        +---------------+                   |  (p5.p6.p7.p8)  |
  1262.        |  c.dmn1.com   |                   | proxy system    |
  1263.        | (c1.c2.c3.c4) |                   |  (p1.p2.p3.p4)  |
  1264.        +---------------+                   +-----------------+
  1265.          | |                                    |   |
  1266.          | | route to S             route to C  |   |
  1267.          | V                                    V   |
  1268.          |                                          |
  1269.          | A                                        | A
  1270.          | | route to C                             | | route to S
  1271.          | |                                        | |
  1272.          | |      C          S                 C    | |
  1273.        +----+    <-- +----+ -->    +----+     <-- +----+
  1274.        | G1 |--------| Gx |--------| Gy |---------| Gn |
  1275.        +----+ -->    +----+    <-- +----+ -->     +----+
  1276.                S                C          S
  1277.  
  1278.       At the start of the FTP session, a TCP packet with a source
  1279.       address of C and a destination address of S travels to the proxy
  1280.       system, expecting to cross it just like a normal IP gateway.
  1281.  
  1282.       This is when the transparent proxy shows its magic:
  1283.  
  1284.       The proxy's TCP/IP software stack sees this incoming packets (and
  1285.       subsequent ones) for a destination address that is NOT one of its
  1286.       own addresses. Based on some criteria (a configuration file, for
  1287.  
  1288.  
  1289.  
  1290. Chatel                       Informational                     [Page 23]
  1291.  
  1292. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1293.  
  1294.  
  1295.       example), it decides NOT to forward or drop the packet (which are
  1296.       the only two choices an RFC-standard TCP/IP implementation would
  1297.       have). The proxy system accepts the packet as if it was directed
  1298.       to one of its own IP addresses.
  1299.  
  1300.       In our example, the incoming packet is a TCP packet. Since
  1301.       standard TCP/IP stacks store both a LOCAL and REMOTE IP address
  1302.       field for each TCP connection, the transparent proxy may set the
  1303.       LOCAL IP address field to the IP address that the client wants to
  1304.       reach (s1.s2.s3.s4 in our example). The standard TCP/IP stack
  1305.       probably needs to be modified to do this. UDP examples, although
  1306.       not connection-based, could be handled in similar ways.
  1307.  
  1308.       Once this is done, the actual FTP proxy application is invoked
  1309.       since an incoming connection to TCP port 21 has occurred. It can
  1310.       determine what is the final target destination instantly, since
  1311.       the LOCAL IP address field of the connection contains the target
  1312.       server's IP address.  There is no need for the proxy application
  1313.       to ask the client what is the final target system.
  1314.  
  1315.       Since the FTP proxy application knows the IP address of the target
  1316.       system, it can choose to do two things:
  1317.  
  1318.        a) Setup a session to the final target system, the more
  1319.           frequent case.
  1320.  
  1321.        b) Decide (based on some internal configuration data) that it
  1322.           cannot reach the final target system directly, but must go
  1323.           through a "classical" proxy. This seems technically
  1324.           feasible, although no real transparent proxy system is
  1325.           known to offer this capability. The actual value of such
  1326.           a feature (if available) would need to be studied.
  1327.  
  1328.       If the FTP proxy decides to connect directly to the target system,
  1329.       it has the target system's IP address. It may choose to do a
  1330.       reverse lookup on the target IP address to obtain a target system
  1331.       name (possibly needed for access control). If this process
  1332.       involves DNS resolution, something like the following will happen:
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Chatel                       Informational                     [Page 24]
  1347.  
  1348. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1349.  
  1350.  
  1351.        +-----------------+
  1352.        | proxy1.dmn3.com |
  1353.        |  (p1.p2.p3.p4)  |          +--------+
  1354.        |                 |         /   IP     \
  1355.        | proxy2.dmn4.com |--------+ network(s) +------------+
  1356.        |  (p5.p6.p7.p8)  |         \          /             |
  1357.        +-----------------+          +--------+      +---------------+
  1358.         A  |                     /          \       | (s1.s2.s3.s4) |
  1359.         |  | name for           /            \      | s.dmn2.com    |
  1360.         |  | s1.s2.s3.s4?      /              \     |               |
  1361.         |  |                  /                \    +---------------+
  1362.         |  |                 /                  \
  1363.         |  |                /                    \
  1364.         |  |         +--------+   s1.s2.s3.s4?    +--------+
  1365.         |  +-------->|  DNS   |------------------>|  DNS   |
  1366.         |            | server |                   | server |
  1367.         +------------|   X    |<------------------|   Y    |
  1368.          s.dmn2.com  +--------+    s.dmn2.com     +--------+
  1369.  
  1370.  
  1371.       Once this is done and if the connection is allowed, the proxy
  1372.       attempts to establish a connection to the standard FTP "control"
  1373.       TCP port on the target server (port 21), using a technique
  1374.       identical to a "classical" proxy. For this to work, the proxy
  1375.       system must have a valid route to the server's IP address, and the
  1376.       server system must have a valid route to at least one of the
  1377.       proxy's IP address. All intermediate devices that behave like IP
  1378.       gateways must have valid routes to both the proxy and the server.
  1379.       If these devices perform packet filtering, they must ALL allow the
  1380.       specific type of traffic required between the proxy and S for this
  1381.       specific application.
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Chatel                       Informational                     [Page 25]
  1403.  
  1404. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1405.  
  1406.  
  1407.        +-----------------+
  1408.        | proxy1.dmn3.com |
  1409.        |  (p1.p2.p3.p4)  |
  1410.        |                 |                 +----------------+
  1411.        | proxy2.dmn4.com |                 |  s.dmn2.com    |
  1412.        |  (p5.p6.p7.p8)  |                 | (s1.s2.s3.s4)  |
  1413.        +-----------------+                 +----------------+
  1414.          | |                                    |   |
  1415.          | | route to S             route to P2 |   |
  1416.          | V                                    V   |
  1417.          |                                          |
  1418.          | A                                        | A
  1419.          | | route to P2                            | | route to S
  1420.          | |                                        | |
  1421.          | |      P2         S                 P2   | |
  1422.        +----+    <-- +----+ -->    +----+     <-- +----+
  1423.        | G1 |--------| Gx |--------| Gy |---------| Gn |
  1424.        +----+ -->    +----+    <-- +----+ -->     +----+
  1425.                S                P2         S
  1426.  
  1427.  
  1428.       The rest of the transparent proxy's operation is very similar to
  1429.       what would happen with a classical proxy.
  1430.  
  1431.    4.2 Characteristics of transparent proxy configurations
  1432.  
  1433.       Transparent proxy technology can be used to build the key
  1434.       component of a "firewall", in a way quite similar to the way
  1435.       classical proxy technology may be used. Several important details
  1436.       of the architecture must be different, however.
  1437.  
  1438.       4.2.1 IP addressing and routing requirements
  1439.  
  1440.          The transparent proxy system must be able to address all client
  1441.          and server systems to which it may provide service. It must
  1442.          also know valid IP routes to all these client and server
  1443.          systems.
  1444.  
  1445.          Server systems must be able to address the proxy system, and
  1446.          must know a valid IP route to the proxy system. If the proxy
  1447.          system has several IP addresses (and often, several physical
  1448.          network interfaces), the server systems need only to be able to
  1449.          access ONE of the proxy system's IP addresses.
  1450.  
  1451.          Client systems MUST HAVE valid IP addressing and routing
  1452.          information for systems that they reach through the proxy. For
  1453.          example, in the common case where a transparent proxy is being
  1454.          used to interconnect a private network and the Internet, the
  1455.  
  1456.  
  1457.  
  1458. Chatel                       Informational                     [Page 26]
  1459.  
  1460. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1461.  
  1462.  
  1463.          private network will effectively need to use a default route
  1464.          that points to the transparent proxy system. This is a specific
  1465.          need of transparent proxy configurations.
  1466.  
  1467.          Interconnecting two internetworks with multiple transparent
  1468.          proxies (for load sharing or fail-over) can be accomplished by
  1469.          using different techniques from what would be done for
  1470.          classical proxies:
  1471.  
  1472.              a) with multiple classical proxies to the same remote
  1473.                 network, clients can be configured to access different
  1474.                 proxies manually, or DNS-based techniques, such as
  1475.                 DNS load-balancing may be used to make clients
  1476.                 access a different proxy at different times.
  1477.  
  1478.              b) with multiple transparent proxies to the same remote
  1479.                 network, the internal network must be able to provide
  1480.                 dynamic routing towards the proxies (routing updates
  1481.                 may need to be supplied by the proxies themselves).
  1482.                 Client systems (depending on topology) may not need
  1483.                 to see the route changes, but internal backbone
  1484.                 routers probably do.
  1485.  
  1486.          It is clear that internetworks linked by a transparent proxy
  1487.          cannot be fully isolated from each other in an IP addressing
  1488.          and routing sense. The network on which client systems are
  1489.          located must have effective valid routing entries to the remote
  1490.          internetwork; these routing entries must point to the proxy.
  1491.  
  1492.          The transparent proxy system (if running a vaguely standard
  1493.          TCP/IP software stack) needs to have a single coherent view of
  1494.          IP addressing and routing. If a proxy system interconnects two
  1495.          IP networks and two systems use the same IP network/subnetwork
  1496.          number (one system on each internetwork), the proxy will only
  1497.          be able to address one of the systems. Even if the proxy is
  1498.          able to manage multiple conflicting IP universes (if, for
  1499.          example, one instance of a complete TCP/IP stack and its data
  1500.          structures is bound to each of the proxy network interfaces),
  1501.          the client systems will still have a problem: Why should it
  1502.          send packets with this network number to the proxy since this
  1503.          network number exists also on the internal internetwork?
  1504.  
  1505.          Chaining transparent proxies does not seem at first glance to
  1506.          solve IP conflicts like it does for classical proxies.
  1507.  
  1508.          From a "security" fail-safe point of view, the transparent
  1509.          proxy has an undesirable characteristic: the network being
  1510.          protected must have valid routing entries to the remote
  1511.  
  1512.  
  1513.  
  1514. Chatel                       Informational                     [Page 27]
  1515.  
  1516. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1517.  
  1518.  
  1519.          network(s). If the proxy fails (starts behaving like a non-
  1520.          filtering IP router) or is physically bypassed, it is likely
  1521.          that the internal network will be immediately able to reply to
  1522.          "attacker" packets. The attacker does not need to modify
  1523.          routing tables or to spoof internal IP addresses.
  1524.  
  1525.          This is important for organizations that do not wish to place
  1526.          ALL their confidence and protection into a proxy system (for
  1527.          whatever reason).
  1528.  
  1529.       4.2.2 IP address hiding
  1530.  
  1531.          Application "sessions" that go through a transparent proxy are
  1532.          actually made of two complete sessions:
  1533.  
  1534.              a) a session between the client and the address of the
  1535.                 server, the session being "intercepted" by the proxy
  1536.              b) a session between the proxy and the server
  1537.  
  1538.          A device on the path sees either the client<->server traffic or
  1539.          the proxy<->server traffic, depending where it is located. The
  1540.          client<-"server" traffic is actually generated by the
  1541.          transparent proxy. The two sessions SHOULD NEVER pass through
  1542.          the same physical network, since in that case (due to the
  1543.          routing requirements) a total bypass of the proxy at the IP
  1544.          routing level may easily occur without being detectable.
  1545.  
  1546.          Like classical proxies, transparent proxies accomplish a form
  1547.          of IP address hiding. Client IP addresses are hidden from the
  1548.          servers, since the servers see a session being initiated by the
  1549.          proxy. Server IP addresses are NOT hidden from the clients
  1550.          however, so that the illusion of transparency may be
  1551.          maintained.
  1552.  
  1553.          This difference implies that internal (client-side) network
  1554.          statistics at the IP level will accurately reflect what outside
  1555.          destinations are being accessed.  This can be useful for
  1556.          analyzing traffic patterns.
  1557.  
  1558.       4.2.3 DNS requirements
  1559.  
  1560.          In transparent proxy configurations, client systems MUST be
  1561.          able to resolve server names belonging to remote networks. This
  1562.          is critical since the proxy will determine the target server
  1563.          from the destination IP address of the packets arriving from
  1564.          the client. Because of this, the "client" internetwork needs to
  1565.          have some form of DNS interconnection to the remote network. If
  1566.          internal client and name server IP addresses must be hidden
  1567.  
  1568.  
  1569.  
  1570. Chatel                       Informational                     [Page 28]
  1571.  
  1572. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1573.  
  1574.  
  1575.          from the outside, these DNS queries must also be proxied.
  1576.  
  1577.          Of course, remote host name/address relationships may be stored
  1578.          locally on the client systems, but it is well known that such
  1579.          an approach does not scale...
  1580.  
  1581.          Because of this, it can be said that a transparent proxy system
  1582.          cannot offer DNS isolation. If two IP internetworks use
  1583.          completely separate DNS trees (each with their own DNS root
  1584.          servers), client software in one IP internetwork will not have
  1585.          a way of finding name/address relationships in the "other" DNS
  1586.          tree, and this information must be obtained in order to pass
  1587.          the desired address to the transparent proxy.
  1588.  
  1589.          The classical proxy itself (if running standard DNS resolution
  1590.          software) will not be able alone to resolve DNS names in both
  1591.          environments, since it will need to point to one or the other
  1592.          of the two DNS "universes".  Running multiple instances of DNS
  1593.          resolution software can allow the proxy to do this, however.
  1594.  
  1595.          Because of the requirement placed on some form of DNS
  1596.          communication through the proxy, it is critical for the proxy
  1597.          to be able to protect ITSELF, internal clients, and internal
  1598.          name servers from data-driven attacks at the DNS level.
  1599.  
  1600.       4.2.4 Software requirements
  1601.  
  1602.          The big advantage of transparent proxies is that normal client
  1603.          software may access remote servers with no modifications and no
  1604.          changes to user procedures.
  1605.  
  1606.          The transparent proxy application itself may not need to be
  1607.          more complicated than a classical proxy application.
  1608.  
  1609.          However, the proxy TCP/IP software stack cannot be a fully-
  1610.          standard (well, today's standard at least) TCP/IP stack, and
  1611.          requires specific extensions:
  1612.  
  1613.              a) the ability to specify ranges of IP addresses that
  1614.                 do not belong to the proxy itself, but for which
  1615.                 "intercept" processing will occur: if packets arrive
  1616.                 at the proxy with a destination IP address in those
  1617.                 ranges, the IP stack will not forward or drop the
  1618.                 packets; it will pass them up to application layers.
  1619.  
  1620.              b) This mechanism requires that applications may obtain
  1621.                 both the IP address from which the packets come, and
  1622.                 the address to which the packets were going. Typical
  1623.  
  1624.  
  1625.  
  1626. Chatel                       Informational                     [Page 29]
  1627.  
  1628. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1629.  
  1630.  
  1631.                 IP stacks should already have the fields available
  1632.                 to store the info; it is a matter of updating them
  1633.                 properly for these "intercepted" packets.
  1634.  
  1635.              c) In the case of "intercepted" TCP packets, the TCP
  1636.                 stack must support establishing TCP connections
  1637.                 where the "local" IP address is not one of the
  1638.                 proxy's IP address.
  1639.  
  1640.          Any TCP/IP software implementation should be modifiable to
  1641.          perform these tasks. If a standard API becomes widely available
  1642.          to drive these extensions, and if this API is generally
  1643.          implemented, transparent proxies may become "portable"
  1644.          applications.
  1645.  
  1646.          Until this occurs, it must be assumed that implementors have
  1647.          chosen different ways of accomplishing these functions, so that
  1648.          today's transparent proxy applications cannot be fully
  1649.          portable. It also remains to be seen how much work is needed to
  1650.          propagate these "extensions" to IPV6 software stacks.
  1651.  
  1652.       4.2.5 Impact of a transparent proxy on packet filtering
  1653.  
  1654.          The nature of a transparent proxy's functionality makes it
  1655.          difficult to deploy good packet filtering on the "inside" (or
  1656.          client-side) of the proxy. The proxy will "masquerade" as all
  1657.          the external systems. Because of this, internal packet filters
  1658.          WILL TYPICALLY NEED TO ALLOW IP traffic between internal and
  1659.          external IP addresses.
  1660.  
  1661.          Depending on the actual security policy of the network, it may
  1662.          be possible to do filtering based on protocol type and/or on
  1663.          TCP bits (to filter based on connection setup direction), but
  1664.          filtering that blocks external IP addresses CANNOT be deployed.
  1665.  
  1666.          If the proxy starts behaving like an IP router, or if
  1667.          physically bypassed, the practical limitations imposed on
  1668.          internal packet filtering imply that a lot of direct traffic
  1669.          between the inside and outside network will be allowed to flow.
  1670.          Furthermore, as we have seen previously, the internal network
  1671.          will have valid routing entries for external network numbers
  1672.          that point to the proxy.  If multiple proxies have been
  1673.          deployed, the internal network may even HAVE TO TRUST routing
  1674.          updates generated by the proxy.
  1675.  
  1676.          In general, if an internal network wishes to communicate with
  1677.          an external network through a transparent proxy, it MUST BE
  1678.          FUNDAMENTALLY DESIGNED TO COMMUNICATE DIRECTLY with that
  1679.  
  1680.  
  1681.  
  1682. Chatel                       Informational                     [Page 30]
  1683.  
  1684. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1685.  
  1686.  
  1687.          external network. This is true at the IP addressing level, at
  1688.          the IP routing level, and at the DNS level.  A proxy security
  1689.          failure in this type of environment is likely to result in
  1690.          immediate, total, and undetected accessibility of the internal
  1691.          network by the external network.
  1692.  
  1693.       4.2.6 Interconnection of conflicting IP networks
  1694.  
  1695.          Unlike classical proxies, transparent proxies do not readily
  1696.          seem useful in solving IP addressing conflicts.
  1697.  
  1698.          If two internetworks use the same network number(s), systems
  1699.          and routers in each internetwork will have valid routes to
  1700.          these network numbers. If these routes are changed to point to
  1701.          a transparent proxy, traffic that is meant to stay within the
  1702.          same internetwork would start to flow towards the proxy. The
  1703.          proxy will not be able to distinguish reliably between traffic
  1704.          between systems of the same internetwork, and traffic which is
  1705.          meant to cross the proxy.
  1706.  
  1707.          A possible solution to this problem is described in section 6
  1708.          of this document, "Improving transparent proxies".
  1709.  
  1710. 5. Comparison chart of classical and transparent proxies
  1711.  
  1712.    For those who do not like longish discussions of technical details,
  1713.    here is a one-page summary of the strengths/weaknesses/differences of
  1714.    classical and transparent proxies:
  1715.  
  1716.     -----------------------------------------------------------------
  1717.    | Issue             |   Classical Proxy   |  Transparent Proxy   |
  1718.    |-------------------+---------------------+----------------------|
  1719.    | IP addressing     | systems/gateways on | systems/gateways on  |
  1720.    |                   | each network need   | the "client" network |
  1721.    |                   | to address the proxy| need to address the  |
  1722.    |                   |                     | remote networks      |
  1723.    |                   |                     |                      |
  1724.    | IP routing        | systems/gateways on | systems/gateways on  |
  1725.    |                   | each network need a | the "client" network |
  1726.    |                   | valid routing entry | also need routing    |
  1727.    |                   | for the proxy       | entries for remote   |
  1728.    |                   |                     | entries              |
  1729.    |                   |                     |                      |
  1730.    | IP address hiding | systems on each side| systems on the       |
  1731.    |                   | of the proxy are    | "client" side are    |
  1732.    |                   | hidden from each    | hidden from the      |
  1733.    |                   | other               | other sides          |
  1734.    |                   |                     |                      |
  1735.  
  1736.  
  1737.  
  1738. Chatel                       Informational                     [Page 31]
  1739.  
  1740. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1741.  
  1742.  
  1743.    | DNS               | full isolation      | resolution of outside|
  1744.    |                   | possible            | names by inside      |
  1745.    |                   |                     | systems is required  |
  1746.    |                   |                     |                      |
  1747.    | Proxy software    | runs on standard    | requires special     |
  1748.    |    requirements   | TCP/IP stack;       | TCP/IP stack;        |
  1749.    |                   | can be portable     | not 100% portable    |
  1750.    |                   |                     |                      |
  1751.    | Client software   | requires proxy-     | nothing more than for|
  1752.    |    requirements   | capable software    | a direct connection  |
  1753.    |                   | or user education   |                      |
  1754.    |                   |                     |                      |
  1755.    | User requirements | must use proxy-     | nothing more than for|
  1756.    |                   | capable software or | a direct connection  |
  1757.    |                   | know how to use the |                      |
  1758.    |                   | proxy               |                      |
  1759.    |                   |                     |                      |
  1760.    | Packet filtering  | can filter out      | cannot filter out    |
  1761.    |                   | "external" addresses| "external" addresses |
  1762.    |                   |                     |                      |
  1763.    | IP address        | can be done with    | no obvious way to    |
  1764.    |    conflict       | chained proxies that| get this to work     |
  1765.    |    resolution     | support auto-connect|                      |
  1766.     ----------------------------------------------------------------
  1767.  
  1768. 6. Improving transparent proxies
  1769.  
  1770.    The main issues with transparent proxies seem to revolve around the
  1771.    need to force "client" systems to directly access external addresses.
  1772.    To some people, this characteristic makes a transparent proxy look
  1773.    too much like a complicated packet filter. Can this problem be
  1774.    solved?
  1775.  
  1776.    The first possibility that comes to mind is to use the flexibility of
  1777.    the DNS protocol to build new tricks. If we restrict the "internal"
  1778.    clients so that they MUST ALWAYS use DNS to resolve external host
  1779.    names AND THAT THEY MUST NEVER store permanent copies of external
  1780.    host addresses, the following technique would become theoretically
  1781.    possible (this is a very painful restriction, by the way):
  1782.  
  1783.    a) arrange for all internal queries for external DNS names to
  1784.       go to the transparent proxy system (this can be done in a
  1785.       number of ways).
  1786.  
  1787.    b) arrange for a routing entry to exist for a class A network
  1788.       number that is not used on the internal network. This IMPLIES
  1789.       that the internal network may not be part of the Internet. This
  1790.       routing entry will point to the transparent proxy system. For
  1791.  
  1792.  
  1793.  
  1794. Chatel                       Informational                     [Page 32]
  1795.  
  1796. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1797.  
  1798.  
  1799.       the purpose of our discussion, this special network number will
  1800.       be X.0.0.0.
  1801.  
  1802.    c) when an internal system generates a query for an external
  1803.       address, the query (if no answer is cached on the internal
  1804.       network) will reach the proxy system. Assuming the query is to
  1805.       obtain the IP address corresponding to a domain name, the proxy
  1806.       will go through the following algorithm:
  1807.  
  1808.       - try to find a valid binding for this external domain name in
  1809.         its local cache
  1810.  
  1811.       - if not found, it will ITSELF launch an external DNS query
  1812.         for the domain name. When (and if) it receives a valid reply,
  1813.         it creates a local cache entry containing:
  1814.  
  1815.             Time To Live of the reply
  1816.             Expiry Time of the cache entry (based on the current time)
  1817.             External domain name
  1818.             External IP address
  1819.             Dynamically allocated IP address of the form X.x1.x2.x3.
  1820.  
  1821.         and returns to the client the dynamically allocated IP address
  1822.         in the range X.0.0.0, NOT THE REAL ONE.
  1823.  
  1824.       - the client may (or may not) store the IP address returned in
  1825.         its cache, and will then attempt to connect to the
  1826.         dynamically allocated IP address. This traffic will arrive at
  1827.         the proxy because of the routing setup.
  1828.  
  1829.       - The transparent proxy intercepts the traffic and can identify
  1830.         the actual desired target it should connect to based on the
  1831.         dynamically allocated IP address supplied by the client.
  1832.  
  1833.    Such an approach, if workable, could improve many characteristics of
  1834.    transparent proxies and may even make transparent proxies capable of
  1835.    handling IP network number conflicts.
  1836.  
  1837.    However, the algorithm above leaves many difficult questions
  1838.    unsolved. Here is a list (by no means exhaustive) of these questions:
  1839.  
  1840.    a) What is the percentage of client DNS resolver and DNS server
  1841.       implementations that conform to the RFC specifications in their
  1842.       handling of the Time-To-Live field?
  1843.  
  1844.    b) How should the proxy handle other types of DNS queries for
  1845.       external domain names (inverse queries, queries for other
  1846.       resource record types)?
  1847.  
  1848.  
  1849.  
  1850. Chatel                       Informational                     [Page 33]
  1851.  
  1852. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1853.  
  1854.  
  1855.    c) A client program may perform a DNS query once for an external
  1856.       name and then use the response for a long time (a large file
  1857.       transfer, or a permanent management session, for example).
  1858.       Should the proxy update the Expiry Time of cache entries based
  1859.       on the passing IP traffic, and if so, using what algorithm?
  1860.  
  1861.    d) What new types of attacks would such a system introduce or
  1862.       make possible?
  1863.  
  1864.    e) What data structures and resources (memory, disk) would be
  1865.       needed for an efficient implementation if the proxy must sustain
  1866.       a high rate of DNS queries for external names, and where a large
  1867.       number of different external names are referenced? The class A
  1868.       network number is used basically to reference cache entries.
  1869.       Would a 24-bit address space be sufficient for practical use?
  1870.  
  1871.    f) What happens with the cache (and the functionality) if the proxy
  1872.       crashes or reboots?
  1873.  
  1874.    Such a system would probably exhibit two types of intermittent
  1875.    failures:
  1876.  
  1877.    a) a client system is still using the result of an external name
  1878.       query (some X.x1.x2.x3 address dynamically allocated by the
  1879.       proxy), but this binding no longer exists in the proxy's cache.
  1880.       The client attempts a connection to this address, which fails.
  1881.  
  1882.    b) a client's name cache contains a binding for X.x1.x2.x3, but the
  1883.       proxy has already reused this address for a different external
  1884.       host name. The client attempts a connection to this address,
  1885.       sees no obvious errors, but reaches a different system from the
  1886.       expected one.
  1887.  
  1888.    If somebody has ever implemented such a scheme, information and live
  1889.    experience in deploying it would be useful to the IP networking
  1890.    community.
  1891.  
  1892. 7. Security Considerations
  1893.  
  1894.    Most of this document is concerned with security implications of
  1895.    classical and transparent proxy technology.
  1896.  
  1897. 8. Acknowledgements
  1898.  
  1899.    I could not have written this document without the support of Digital
  1900.    Equipment Corporation for whom I work as a consultant.
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Chatel                       Informational                     [Page 34]
  1907.  
  1908. RFC 1919        Classical versus Transparent IP Proxies       March 1996
  1909.  
  1910.  
  1911. 9. References
  1912.  
  1913.    [1] Cheswick, W., Bellovin, S., "Firewalls and Internet Security:
  1914.        Repelling the Wily Hacker", Addison-Wesley, 1994.
  1915.  
  1916.    [2] Chapman, B., Zwicky, E., "Building Internet Firewalls",
  1917.        O'Reilly and Associates, Inc., September 1995.
  1918.  
  1919.    [3] Comer, D., "Internetworking with TCP/IP volume 1: Principles,
  1920.        Protocols, and Architecture", Prentice-Hall, 1991.
  1921.  
  1922.    [4] Comer, D., Stevens, D., "Internetworking with TCP/IP volume 2:
  1923.        "Design, Implementation, and Internals", Prentice-Hall, 1991.
  1924.  
  1925.    [5] Postel, J., and J. Reynolds, "File Transfer Protocol (FTP)",
  1926.        STD 9, RFC 959, USC/Information Sciences Institute, October
  1927.        1985.
  1928.  
  1929.    [6] Huitema, C., "An experiment in DNS Based IP Routing", RFC 1383,
  1930.        INRIA, December 1992.
  1931.  
  1932.    [7] Rekhter Y., Moskowitz B., Karrenberg D., de Groot, G.,
  1933.        "Address Allocation for Private Internets", RFC 1597,
  1934.        IBM Corp., Chrysler Corp, RIPE NCC, March 1994.
  1935.  
  1936.    [8] The TIS firewall toolkit's documentation, available on
  1937.        Trusted Information System's anonymous FTP site, ftp.tis.com.
  1938.  
  1939.    [9] Many discussions in the last 18 months on the firewalls-digest
  1940.        mailing list maintained by Great Circle Associates. The
  1941.        archives of the list are maintained at ftp.greatcircle.com.
  1942.  
  1943. Author's Address
  1944.  
  1945.    Marc Chatel
  1946.    9, avenue Jean Monnet
  1947.    74940 ANNECY-LE-VIEUX
  1948.    FRANCE
  1949.  
  1950.    EMail: mchatel@pax.eunet.ch
  1951.    or at Digital Equipment:
  1952.    Marc.Chatel@aeo.mts.dec.com
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Chatel                       Informational                     [Page 35]
  1963.  
  1964.